package com.tingyuge.base.design.adapter;

/**
 * @Created by xiaodao
 * 火鸡适配器 要适配成鸭子
 */
public class TurkeyAdapter extends WildTurkey implements Duck{

    private  Turkey turkey;

    public TurkeyAdapter(Turkey turkey) {
        this.turkey = turkey;
    }

    public void fly() {
        turkey.fly();

    }

    public void quack() {
        for (int i = 0; i <2 ; i++) {
            turkey.gobble();
        }

    }
}
